package fr.vvins.core.services;

import java.util.List;
import java.util.Set;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import fr.vvins.core.biz.catalog.dto.VigneronDto;
import fr.vvins.core.biz.catalog.dto.VigneronDtoInfo;
import fr.vvins.core.biz.catalog.dto.VinDto;
import fr.vvins.core.biz.catalog.dto.VinDtoInfo;
import fr.vvins.core.biz.exception.BizException;
import fr.vvins.core.common.TechnicalException;
import fr.vvins.core.common.dto.BeanDtoInfo;

/**
 * Catalog interface groups all methods related catalog.
 * @author fguay
 *
 */

public interface CatalogService {
	/**
	 * Get detail of a vigeron by id.<BR>
	 * Method : GET<BR>
	 * Path : "/catalog/vigneron/{id}" <BR>
	 * Produces : MediaType.APPLICATION_JSON
	 * @param vigneronId : vigneron id
	 * @return a vigneron detail
	 * @throws BizException
	 * @throws TechnicalException
	 */
	@GET
	@Path("/vigneron/{id}")
	@Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
	public VigneronDto getVigneron(@PathParam("id")String vigneronId)throws BizException, TechnicalException;

	/**
	 * Get detail of a vigeron by id.<BR>
	 * Method : GET<BR>
	 * Path : "/catalog/vigneron/related/{id}" <BR>
	 * Produces : MediaType.APPLICATION_JSON
	 * @param vigneronId : vigneron id
	 * @return a vigneron detail
	 * @throws BizException
	 * @throws TechnicalException
	 */
	@GET
	@Path("/vigneron/related/{id}")
	@Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
	public List<BeanDtoInfo> getRelatedVigneron(@PathParam("id")String vigneronId)throws BizException, TechnicalException;
	
	
	/**
	 * Get all vignerons.<BR>
	 * Method : GET<BR>
	 * Path : "/catalog/vignerons"<BR>
	 * Produces : MediaType.APPLICATION_JSON<BR>
	 * 
	 * @return list of vignerons
	 * @throws BizException
	 * @throws TechnicalException
	 */
	@GET
	@Path("/vignerons")
	@Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
	public List<VigneronDtoInfo> getAllVigneron() throws BizException, TechnicalException;

	
	/**
	 * Return detail of vin by id.<BR>
	 * Method : GET<BR>
	 * Path : "/catalog/vin/{id}"<BR>
	 * Produces : MediaType.APPLICATION_JSON<BR>
	 * 
	 * @param vinId : vin id
	 * @return detail of vin
	 * @throws BizException
	 * @throws TechnicalException
	 */
	@GET
	@Path("/vin/{id}")	
	@Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
	public VinDto getVin(@PathParam("id")String vinId) throws BizException, TechnicalException;
	
	/**
	 * Return detail of vin by id.<BR>
	 * Method : GET<BR>
	 * Path : "/catalog/vin/vigneron/{id}"<BR>
	 * Produces : MediaType.APPLICATION_JSON<BR>
	 * 
	 * @param vinId : vin id
	 * @return detail of vin
	 * @throws BizException
	 * @throws TechnicalException
	 */
	@GET
	@Path("/vin/vigneron/{id}")	
	@Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
	public Set<VinDtoInfo> getVinByVigneron(@PathParam("id")String vigneronId) throws BizException, TechnicalException;

	
	/**
	 * Get list content by id.<BR>
	 * Method : GET<BR>
	 * Path : "/catalog/list/{id}" <BR>
	 * Produces : MediaType.APPLICATION_JSON
	 * @param listId : a list id
	 * @return a DtoImpl detail
	 * @throws BizException
	 * @throws TechnicalException
	 */
	@GET
	@Path("/list/{id}")
	@Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
	public List<BeanDtoInfo> getList(@PathParam("id")String listId)throws BizException, TechnicalException;
	
	/**
	 * Get content by id.<BR>
	 * Method : GET<BR>
	 * Path : "/catalog/content/{id}" <BR>
	 * Produces : MediaType.APPLICATION_JSON
	 * @param contentId : a content id
	 * @return a DtoImpl detail
	 * @throws BizException
	 * @throws TechnicalException
	 */
	@GET
	@Path("/content/{id}")
	@Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
	public BeanDtoInfo getContent(@PathParam("id")String contentId)throws BizException, TechnicalException;
	
	
}
